import request from '@/utils/request'

export function staff(data) {
  return request({
    url: '/agent/list',
    method: 'get',
    params: data
  })
}


export function getObj(data) {
  return request({
    url: '/agent/user',
    method: 'get',
    params: {
      id: data
    }
  })
}

export function addOrUpdate(data) {
  return request({
    url: '/agent/addOrUpdate',
    method: 'post',
    data
  })
}


export function agentList() {
  return request({
    url: '/dept/list',
    method: 'get'  
  })
}



export function subList(id) {
  return request({
    url: '/agent/district',
    method: 'get',
    params: {
        id: id
    }    
  })
}



export function limitLogin(data) {
  return request({
    url: '/agent/limitLogin',
    method: 'post',
    params: data
  })
}

export function searchByKw(data) {
  return request({
    url: '/agent/searchByKw',
    method: 'get',
    params: {
      kw: data
    }
  })
}